package com.heima.admin.config;

import com.heima.admin.interceptor.AdminTokenInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author Xiao
 * @version 1.0
 * @description
 * @date 2021/11/29
 */
@Configuration
public class AdminWebMvcConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new AdminTokenInterceptor()).addPathPatterns("/**");
    }
}
